@echo off

set CLASSPATH=lib\jfreechart-1.0.5.jar;lib\jcommon-1.0.9.jar;lib\junit.jar;bin\;lib\;.

	

set BIN=bin
set LIB=lib\org\jfree\jfreechart-1.0.5.jar;lib\org\jfree\jcommon-1.0.9.jar;lib\org\junit\junit.jar
set DOC=doc
set MANIFEST=Manifest
set MGUI=mygui
set IMG_M=%MGUI%\images
set UTILS=utils
set TESTS=tests
set RESULTS=results
set OBJECTS=objects
set MODELS=objects\models
set TUI=tui
set DTD=tui\simmobil.dtd
set ENCODING=-encoding ISO8859-1
set DESTINATION=-d %BIN%
set FILES= tui/*.java utils/*.java exception/*.java brain/kernel/*.java brain/communication/*.java brain/communication/pack/*.java brain/communication/thirdLayer/*.java brain/communication/secondLayer/*.java brain/communication/frequencyChoice/*.java brain/objects/*.java brain/objects/distribution/*.java brain/move/*.java brain/comRadiusController/*.java brain/sleeping/*.java brain/comRadiusController/utils/*.java brain/results/*.java mygui/*.java

if "%1"=="exe" goto exe

del %BIN%\%UTILS%\*.* /q/s/f
del %BIN%\%MGUI%\*.*  /q/s/f
del %BIN%\%IMG_M%\*.*  /q/s/f
del %BIN%\%TESTS%\*.*  /q/s/f
del %BIN%\%OBJECTS%\*.*  /q/s/f
del %BIN%\%MODELS%\*.*  /q/s/f
del %BIN%\%RESULTS%\*.*  /q/s/f

mkdir %BIN%\%UTILS%\
mkdir %BIN%\%MGUI%\
mkdir %BIN%\%IMG_M%\
mkdir %BIN%\%TESTS%\
mkdir %BIN%\%OBJECTS%\
mkdir %BIN%\%MODELS%\
mkdir %BIN%\%RESULTS%\

copy %DTD% %BIN%\%RESULTS%
copy %IMG_M%\*.* %BIN%\%IMG_M%

echo Building SimMobil, please wait
javac %DESTINATION% %ENCODING% %FILES%

echo SimMobil built

goto fin

:exe

java %UTILS%/Launcher

:fin


